package com.hdc.autotest;

import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;

import java.time.Duration;

public class AutoTest1 {
    private ChromeDriver driver = new ChromeDriver();

    @Test
    void zhujie_test() throws InterruptedException {
        driver.get("https://www.baidu.com");
        driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2));
        driver.findElement(By.cssSelector("#kw")).sendKeys("hello");
        driver.findElement(By.cssSelector("#su")).click();
        Thread.sleep(2000);
        driver.quit();
    }

    @Test
    void test() throws InterruptedException {
        driver.get("https://www.baidu.com");
        driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2));
        driver.findElement(By.cssSelector("#kw")).sendKeys("hello");
        driver.findElement(By.cssSelector("#su")).click();
        Thread.sleep(2000);
        driver.quit();
    }

    @Test
    void aaa() {
        System.out.println("aaa");
    }

    @Test
    void bbb() {
        System.out.println("bbb");
    }

    @Test
    void ccc() {
        System.out.println("ccc");
    }
}
